<!DOCTYPE html>
<html>
<head>
    <title>团队成员管理</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="/statics/plugins/element-ui/index.css">
    <link rel="stylesheet" href="/statics/css/jquery.fileupload.css">
    <link rel="stylesheet" href="/statics/css/jquery.fileupload-ui.css">
    <link rel="stylesheet" href="/statics/css/bootstrap.min.css">
    <link rel="stylesheet" href="/statics/css/font-awesome.min.css">
    <link rel="stylesheet" href="/statics/plugins/jqgrid/ui.jqgrid-bootstrap.css">
    <link rel="stylesheet" href="/statics/plugins/ztree/css/metroStyle/metroStyle.css">
    <link rel="stylesheet" href="/statics/css/main.css">
    <script src="/statics/libs/jquery.min.js"></script>
    <script src="/statics/plugins/layer/layer.js"></script>
    <script src="/statics/libs/bootstrap.min.js"></script>
    <script src="/statics/libs/vue.min.js"></script>
    <script src="/statics/libs/validator.min.js"></script>
    <script src="/statics/plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="/statics/plugins/jqgrid/jquery.jqGrid.min.js"></script>
    <script src="/statics/plugins/ztree/jquery.ztree.all.min.js"></script>
    <!--add validationEngine start 前端验证-->
    <link rel="stylesheet" href="/statics/plugins/validationEngine/validationEngine.jquery.css">
    <script src="/statics/plugins/validationEngine/jquery.validationEngine-zh_CN.js"></script>
    <script src="/statics/plugins/validationEngine/jquery.validationEngine-custom.js"></script>
    <script src="/statics/plugins/validationEngine/jquery.validationEngine.js"></script>
    <!--add validationEngine end-->
    <script src="/statics/js/init.js"></script><script src="/statics/js/common.js"></script>

    <script src="/statics/libs/jfu/jquery.ui.widget.js"></script>
    <script src="/statics/libs/jfu/jquery.iframe-transport.js"></script>
    <script src="/statics/libs/jfu/jquery.fileupload.js"></script>
    <script src="/statics/plugins/element-ui/index.js"></script>
    <style>
       /* @import url("//unpkg.com/element-ui@2.4.7/lib/theme-chalk/index.css");*/
        .avatar-uploader .el-upload {
            border: 1px dashed #d9d9d9;
            border-radius: 6px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }
        .avatar-uploader .el-upload:hover {
            border-color: #409EFF;
        }
        .avatar-uploader-icon {
            font-size: 28px;
            color: #8c939d;
            width: 178px;
            height: 178px;
            line-height: 178px;
            text-align: center;
        }
        .avatar {
            width: 178px;
            height: 178px;
            display: block;
        }
        .ui-jqgrid tr.jqgrow td { text-overflow : ellipsis; }
        input[type=file]{display:none;}
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="q.name" @keyup.enter="query" placeholder="专家姓名">
            </div>
            <a class="btn btn-default" @click="query">查询</a>
            <a v-if="hasPermission('orth:team:save')" class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            <a v-if="hasPermission('orth:team:update')" class="btn btn-primary" @click="update"><i
                    class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            <a v-if="hasPermission('orth:team:delete')" class="btn btn-primary" @click="del"><i
                    class="fa fa-trash-o"></i>&nbsp;删除</a>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
         <!--   <div class="form-group">
                <div class="col-sm-2 control-label">姓名</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control validate[required,minSize[2],maxSize[50]]" v-model="" placeholder="姓名"/>
                </div>
            </div>-->

            <div class="form-group">
                <div class="col-sm-2 control-label">医疗团队</div>
                <div class="col-sm-10">
                    <select v-model="team.type" @change="getExperts" class="form-control  validate[required]">
                        <option v-for="item in items" v-bind:value="item.value">{{item.text}}</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">头像</div>
                <div class="col-sm-10">
                    <el-upload
                            class="avatar-uploader"
                            :action="requestUrl"
                            :show-file-list="false"
                            :data="token"
                            :on-success="handleAvatarSuccess0"
                            :before-upload="handlePreview0"
                            accept="image/*">
                        <img v-if="picUrl" :src="picUrl" style="" class="avatar">
                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                        <div slot="tip" class="el-upload__tip">图片尺寸只能上传jpg/png文件，且不超过2Mb</div>
                    </el-upload>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">选择专家</div>
                <div class="col-sm-10">
                    <select v-show="title=='新增'" v-model="team.siteExpertId" class="form-control  validate[required]">
                        <option v-for="item in experts" v-bind:value="item.expert_id">{{item.name}}</option>
                    </select>
                    <select  v-show="title=='修改'" readonly  v-model="team.siteExpertId" class="form-control">
                        <option  v-bind:value="team.siteExpertId">{{team.name}}</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">备注字段</div>
                <div class="col-sm-10">
                    <textarea  class="form-control " v-model="team.json" placeholder="备注字段"></textarea>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="/statics/js/modules/orth/team.js"></script>
</body>
</html>